<template>
  <tfoot>
    <tr>
      <td>合计:</td>
      <td colspan="5">{{ hj }}</td>
    </tr>
  </tfoot>
</template>

<script>
export default {
  props: ["list"],
  computed: {
    hj() {
      let newList = this.list.filter((item) => item.checked);

      return newList.reduce((sum, item) => (sum += item.price * item.num), 0);
    },
  },
};
</script>

<style></style>
